home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / elhash.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-06  |  2.3 KB  |  67 lines

  1. /* This file is part of XEmacs.
  2.  
  3. XEmacs is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU General Public License as published by the
  5. Free Software Foundation; either version 2, or (at your option) any
  6. later version.
  7.  
  8. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  9. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11. for more details.
  12.  
  13. You should have received a copy of the GNU General Public License
  14. along with XEmacs; see the file COPYING.  If not, write to the Free
  15. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16.  
  17. /* Synched up with: Not in FSF. */
  18.  
  19.  
  20. #ifndef _XEMACS_ELHASH_H_
  21. #define _XEMACS_ELHASH_H_
  22.  
  23. enum hashtable_type
  24. {
  25.   HASHTABLE_NONWEAK,
  26.   HASHTABLE_KEY_WEAK,
  27.   HASHTABLE_VALUE_WEAK,
  28.   HASHTABLE_WEAK
  29. };
  30.  
  31. extern Lisp_Object Fmake_hashtable (Lisp_Object size);
  32. extern Lisp_Object Fcopy_hashtable (Lisp_Object old_table);
  33. extern Lisp_Object Fgethash (Lisp_Object obj, Lisp_Object table, 
  34.                              Lisp_Object defalt);
  35. extern Lisp_Object Fputhash (Lisp_Object obj, Lisp_Object val, 
  36.                              Lisp_Object table);
  37. extern Lisp_Object Fremhash (Lisp_Object obj, Lisp_Object table);
  38. extern Lisp_Object Fhashtable_fullness (Lisp_Object table);
  39.  
  40. extern Lisp_Object make_lisp_hashtable (int size,
  41.      int (*test_function) (CONST void*, CONST void*),
  42.      unsigned long (*hash_function) (CONST void*),
  43.      enum hashtable_type type);
  44.  
  45. extern void elisp_maphash (void (*fn) (CONST void *key, void *contents,
  46.                        void *extra_arg),
  47.                            Lisp_Object table, 
  48.                            void *extra_arg);
  49.  
  50. extern void elisp_map_remhash (int (*fn) (CONST void *key,
  51.                       CONST void *contents,
  52.                       void *extra_arg),
  53.                            Lisp_Object table, 
  54.                            void *extra_arg);
  55.  
  56. extern int finish_marking_weak_hashtables (int (*obj_marked_p) (Lisp_Object),
  57.                        void (*markobj) (Lisp_Object));
  58. extern void prune_weak_hashtables (int (*obj_marked_p) (Lisp_Object));
  59.  
  60. extern char *elisp_hvector_malloc (unsigned int, Lisp_Object);
  61. extern void elisp_hvector_free (void *ptr, Lisp_Object table);
  62.  
  63. extern int lisp_string_equal (CONST void *x1, CONST void *x2);
  64. extern unsigned long lisp_string_hash (CONST void *x);
  65.  
  66. #endif /* _XEMACS_ELHASH_H_ */
  67.